<template>
    <div>
        <div class="i-layout-page-header">
            <PageHeader title="基本信息" hidden-breadcrumb />
        </div>
        <Card :bordered="false" dis-hover class="ivu-mt i-table-no-border">
             <DescriptionList title="基本信息" :col="1">
                 <Description term="姓名：">{{data.nickName}}</Description>
                 <Description term="上班时间：">{{data.clockStartTime}}</Description>
                 <Description term="下班时间：">{{data.clockEndTime}}</Description>
                 <Description term="考勤情况：">
                     <span v-if="data.clockInfo === '1'">正常</span>
                     <span v-if="data.clockInfo === '2'">迟到</span>
                     <span v-if="data.clockInfo === '3'">早退</span>
                     <span v-if="data.clockInfo === '4'">迟到+早退</span>
                     <span v-if="data.clockInfo === '5'">旷工</span>
                     <span v-if="data.clockInfo === ''">其它</span>
                 </Description>
                 <Description term="打卡地址：">{{data.clockAddress}}</Description>

             </DescriptionList>
        </Card>
    </div>
</template>
<script>
    import Attendance from "@/api/Attendance";
    export default {
        data () {
            return {
                data:''
            }
        },
        created() {
            this.getDtail();
        },
        methods:{
            getDtail(){
                Attendance.selectAttendanceById({
                    clockId:this.$route.query.clockId
                })
                    .then(res => {
                        // 返回数据
                        this.data = res;

                    })
                    .catch(err => {
                        // 异常情况
                    })
            }
        }
    }
</script>
